package test;

import java.io.IOException;
import java.util.HashMap;

public class demo12TcpDicServer extends demo9TcpEchoServer{
    public demo12TcpDicServer(int port) throws IOException {
        super(port);
    }
    public String process(String request) {
        HashMap dic = new HashMap();
        dic.put("cat" , "小猫");
        dic.put("dog", "小狗");
        return (String) dic.get(request);
    }

    public static void main(String[] args) throws IOException {
        demo12TcpDicServer demo12TcpDicServer = new demo12TcpDicServer(9090);
        demo12TcpDicServer.start();
    }
}
